home *** CD-ROM | disk | FTP | other *** search
- /************/
- /* a2g.rexx */
- /************/
-
- /*******************************************************************/
- /* */
- /* Author: T. B. Kreuzer */
- /* */
- /* Description: This ARexx script will take an Aminet "INDEX" */
- /* or "RECENT" output file (saved from Term), */
- /* convert it to an AmigaGuide file, and execute */
- /* AmigaGuide so that the AmigaGuide display is */
- /* opened on the Term screen. */
- /* */
- /* Pre-requisites: 1) ARexx must be active */
- /* 2) Term must be active */
- /* 3) Term "buffer" containing "INDEX" or "RECENT" */
- /* output from Aminet has been saved to */
- /* "RAM:Aminet" */
- /* 4) "Aminet2Guide" program is in the C: */
- /* directory */
- /* 5) "AmigaGuide" program is in the SYS:Utilities */
- /* directory */
- /* */
- /* WARNING: This script should ONLY be run from OUTSIDE the Term */
- /* program (i.e., from the CLI/Shell). For some unknown */
- /* reason, running this from within Term causes the Term */
- /* screen to go blank! */
- /* */
- /*******************************************************************/
-
-
- /* Tell Term to Shanghai any new windows so that */
- /* they open on the Term screen */
-
- OPTIONS RESULTS
-
- ADDRESS term
-
- GETATTR screenprefs.shanghaiwindows
-
- IF result = OFF THEN 'SETATTR screenprefs shanghaiwindows ON'
-
- /* Delete any old AmigaGuide output from a previous run */
-
- ADDRESS command
-
- 'C:Delete >NIL: RAM:Aminet.guide'
-
- /* Convert "RAM:Aminet output to AmigaGuide format */
-
- 'C:Aminet2Guide RAM:Aminet RAM:Aminet.guide'
-
- /* Wait until output AmigaGuide file has been created */
-
- loop:
- 'C:List >NIL: RAM:Aminet.guide'
-
- if RC ~= 0 THEN SIGNAL loop
-
- /* Invoke AmigaGuide on the output AmigaGuide file */
-
- 'SYS:Utilities/AmigaGuide RAM:Aminet.guide'
-
- /* Tell Term to stop Shanghai'ing windows */
-
- ADDRESS term
-
- SETATTR screenprefs shanghaiwindows OFF
-
- /* End of script */
-
- EXIT
-